package com.dt.app.modules.product.vo;

import java.math.BigDecimal;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import com.dt.app.modules.base.entites.PageEntity;
/**
 * <p>
 * 
 * </p>
 *
 * @author 鸿源塔基
 * @since 2024-03-11
 */
@Data
@NoArgsConstructor
@ApiModel(value="ProductGg对象", description="")
public class ProductGgBean extends PageEntity implements Serializable {

    private static final long serialVersionUID=20240311231002942L;

    @ApiModelProperty(value = "产品规格定义")
    private Integer productGgId;

    @ApiModelProperty(value = "栏目")
    private Integer categoryId;
    private String categoryIdName;

    @ApiModelProperty(value = "产品")
    private Integer productId;
    private String productIdName;

    @ApiModelProperty(value = "编码")
    private String ggNo;

    @ApiModelProperty(value = "规格名称")
    private String ggName;

    @ApiModelProperty(value = "值 , 号隔开")
    private String ggValue;
    private String[] ggValueArray;

    @ApiModelProperty(value = "int  string float")
    private String ggValueType;

    @ApiModelProperty(value = "组合方式 1单选框  2复选框 3下拉框 4输入框 7自定义-区间输入框")
    private Integer ggType;

    @ApiModelProperty(value = "是否可以自定义输入")
    private Integer ggTypeUdo;

    @ApiModelProperty(value = "降序 组合优先级 级别越高值越大")
    private Integer ggLevel;

    @ApiModelProperty(value = "对外说明")
    private String ggMsg;

    @ApiModelProperty(value = "内部说明")
    private String ggMsgOut;

    @ApiModelProperty(value = "价格公式 J+  C=*  其它=线下公式编码")
    private String gsTypeName;

    @ApiModelProperty(value = "公式叠加值")
    private BigDecimal gsTypeValue;

    @ApiModelProperty(value = "0 1必填")
    private Integer isNeed;

    public void toInitArray(){
        if(ggValue!=null && ggValue.contains(",")){
            ggValueArray=ggValue.split(",");
        }
    }
}